package com.rst.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name="t_teacher")
public class Teacher {

	public static final int ACTIVE = 1;
	public static final int INACTIVE = 0;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name="f_teacher_id")
	private Long id;	
	
	@Column(name="f_user_id")	
	private String userId;
	
	@Column(name="f_subject_id")	
	private Long subjectId;

	@Column(name="f_qualification_id")	
	private Long  qualificationId;

	@Column(name="f_status")
	private Integer status;
	
	@OneToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="f_user_id", nullable=false, insertable=false, updatable=false)
	private UserDetailsDTO userDetails ;
	
	@OneToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="f_subject_id", nullable=false, insertable=false, updatable=false)
	private Subject subject  ;

	@OneToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="f_qualification_id", nullable=false, insertable=false, updatable=false)
	private Qualification qualification  ;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public Long getSubjectId() {
		return subjectId;
	}

	public void setSubjectId(Long subjectId) {
		this.subjectId = subjectId;
	}

	public Long getQualificationId() {
		return qualificationId;
	}

	public void setQualificationId(Long qualificationId) {
		this.qualificationId = qualificationId;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}


	public UserDetailsDTO getUserDetails() {
		return userDetails;
	}

	public void setUserDetails(UserDetailsDTO userDetails) {
		this.userDetails = userDetails;
	}

	public Subject getSubject() {
		return subject;
	}

	public void setSubject(Subject subject) {
		this.subject = subject;
	}

	public Qualification getQualification() {
		return qualification;
	}

	public void setQualification(Qualification qualification) {
		this.qualification = qualification;
	}


	
}
